<%-- 
    Document   : header
    Created on : 2014-7-29, 16:55:39
    Author     : coolwind
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<script type="text/javascript" src="<c:url value="/common/js/common.js"/>"></script>
<div class="navbar navbar-t navbar-fixed-top" role="navigation">
    <div class="container nav-container">
        <div class="navbar-header">
            <button type="button" class="collapsed navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand">听海小筑</a>
        </div>
        <div class="collapse navbar-collapse">
            <ul class="nav navbar-nav">
                <li><a href="<c:url value="/"/>">首页</a></li>
                <li><a href="<c:url value="/user/info"/>">关于我</a></li>
                <li><a href="<c:url value="/user/contact"/>">联系我</a></li>
            </ul>
            <ul class="nav navbar-nav nav-right">
                <c:choose>
                    <c:when test="${!empty user_name}">
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-title="用户信息" id="dropdown">${user_name}<span class="caret"></span></a>
                            <ul class="dropdown-menu">
                                <li><a href="<c:url value="/user/info/update"/>">更新资料</a></li>
                                <li><a href="<c:url value="/admin/console"/>">控制台</a></li>
                                <li><a href="<c:url value="/user/logout"/>">退出</a></li>
                            </ul>
                            <%--
                            <div id="popover-content">
                                <div class="user-info">
                                    <div class="user-icon">
                                        <img width="100%" src="<c:url value="/images/default-icon.jpg"/>"/>
                                    </div>
                                    <div class="user-change">
                                        <p>${user_name}</p>
                                        <a href="" class="btn btn-primary">更新信息</a>
                                    </div>
                                    <div class="clear"></div>
                                </div>
                            </div>--%>
                        </li>
                    </c:when>
                    <c:otherwise>
                        <li>
                            <a href="<c:url value="/user/login"/>">登录</a>
                        </li>
                        <%--
                        <li>
                            <a href="<c:url value="/user/register"/>">注册</a>
                        </li>
                        --%>
                    </c:otherwise>
                </c:choose>
            </ul>
            <div class="clear"></div>
        </div>
    </div>
</div>

<div id="navbar-container">

</div>
